package com.chixing.Homework;

public class Bank {
    //初始化50个容量的Account数组 用于 保存账户信息
    private  Account[] accountArr = new Account[50];
    private int size=0;




    //开户
    public Account registAccount(long no,String name,long tel,long pwd,String email,double bal,int type){
        Account acc=null;
        if(type == 0){
          acc = new SavingAccount(26484645L,name,tel,pwd,email,0,0);
        }else{
            acc = new CreditAccount(26484645L,name,tel,pwd,email,0,0);
        }
        accountArr[size++]=acc;
        return acc;


        // ..
    }
}
